import request from "@/utils/request";

// 获取监控历史数据
export function monitorsHistoryApi(params) {
  return request({
    url: "/monitors/history",
    method: "get",
    params,
  });
}
// 获取监控模块筛选信息
export function typesModuleApi(params) {
  return request({
    url: "/types/module",
    method: "get",
    params,
  });
}

// 获取机场信息
export function airportsApi(params) {
  return request({
    url: "/airports/full",
    method: "get",
    params,
  });
}

// 从文件导入机场信息
export function airportsImport(data) {
  return request({
    url: "/airports/import",
    method: "post",
    data,
  });
}

// 获取区域信息
export function areaApi(params) {
  return request({
    url: "/areas",
    method: "get",
    params,
  });
}
// 获取航路基础信息
export function baseRoutesApi(params) {
  return request({
    url: "/base/routes",
    method: "get",
    params,
  });
}
// 获取航路详细信息
export function detailRoutesApi(params) {
  return request({
    url: "/detail/routes",
    method: "get",
    params,
  });
}

// 从文件导入航路基本信息
export function baseRoutesImportApi(data) {
  return request({
    url: "/base/routes/import",
    method: "post",
    data,
  });
}
// 从文件导入航路详细信息
export function detailRoutesImportApi(data) {
  return request({
    url: "/detail/routes/import",
    method: "post",
    data,
  });
}

// 获取卫星信息
export function satellitesApi(params) {
  return request({
    url: "/satellites",
    method: "get",
    params,
  });
}
// 从文件导入历书信息
export function satellitesImportApi(data) {
  return request({
    url: "/satellites/import",
    method: "post",
    data,
  });
}
// 获取登录日志
export function logLoginsApi(params) {
  return request({
    url: "/log/logins",
    method: "get",
    params,
  });
}
// 获取操作日志
export function logOperationsApi(params) {
  return request({
    url: "/log/operations",
    method: "get",
    params,
  });
}
// 查询公告
export function noticesFullApi(params) {
  return request({
    url: "/notices/full",
    method: "get",
    params,
  });
}
// 删除公告
export function deleteNoticesIdApi(id) {
  return request({
    url: `/notices/` + id,
    method: "delete",
  });
}

// 获取公告详情
export function noticesIdApi(id) {
  return request({
    url: `/notices/` + id,
    method: "get",
  });
}

// 插入公告
export function postNoticesApi(data) {
  return request({
    url: "/notices",
    method: "post",
    data,
  });
}
// 更新公告
export function putNoticesApi(data) {
  return request({
    url: "/notices",
    method: "put",
    data,
  });
}
// 获取所有公告类型
export function typesNoticeApi() {
  return request({
    url: "/types/notice",
    method: "get",
  });
}
// 发布公告
export function putNoticesIdPublishApi(id) {
  return request({
    url: `/notices/` + id + "/publish",
    method: "put",
  });
}
// 获取用户类型
export function typesRoleApi() {
  return request({
    url: "/types/role",
    method: "get",
  });
}
// 过滤获取用户列表
export function systemUsersApi(params) {
  return request({
    url: "/system/users",
    method: "get",
    params,
  });
}
// 新增用户
export function postSystemUsersApi(data) {
  return request({
    url: "/system/users",
    method: "post",
    data,
  });
}
// 获取指定用户详情
export function systemUserIdApi(id) {
  return request({
    url: `/system/users/` + id,
    method: "get",
  });
}
// 更新指定用户信息
export function putSystemUserIdApi(data) {
  return request({
    url: "/system/users/",
    method: "put",
    data,
  });
}
// 删除指定用户
export function deleteSystemUserIdApi(id) {
  return request({
    url: `/system/users/` + id,
    method: "delete",
  });
}
// 审批用户注册
export function systemUserIdAuditApi(data) {
  return request({
    url: "/system/users/audit",
    method: "put",
    data,
  });
}
// 获取Nanu报文
export function nanusApi(params) {
  return request({
    url: "/nanus",
    method: "get",
    params,
  });
}
// 从文件导入Nanu信息
export function postNanusImportApi(data) {
  return request({
    url: "/nanus/import",
    method: "post",
    data,
  });
}
